import { getLateDeliveryTime } from '/services/order';
Page({
  data: {
    orderId: 0,
    deliveryTime: ''
  },
  onShow() {
    my.setNavigationBar({
      title: '成功',
      backgroundColor: '#4BA3F9'
    })
  },
  toorder() {
    my.navigateTo({
      url: '/pages/my-order/my-order',
    })
  },
  tohome() {
    my.switchTab({
      url: '/pages/home/home',
    })
  },
  onLoad(event) {
    this.setData({ orderId: event.orderid })
    getLateDeliveryTime({ orderId: this.data.orderId }).then(res => {
      if (res.code == "000000") {
        this.setData({ deliveryTime: res.data })
      }
    })
  }

});
